package cate.game.train.spice.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import easy.java.dev.note.NoteField;

import java.util.List;

@ClientMsg(title = "英雄卸下星格の 请求")
@OperationSetter(GDOperation.SPICE_OFF)
public class SpiceOffReq implements MsgInput {
    @NoteField(value = "英雄ID", detail = "要给哪一个英雄脱星格")
    public String heroUid;

    @NoteField(value = "部位ID", detail = "要脱的部位")
    public List<Byte> posList;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        game.train.spice.off(cc.getRole(), heroUid, posList);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.HERO_SPICE_OFF_REQ;
    }
}
